* The contents of this file are subject to the Open Software License Version
* 2.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.opensource.org/licenses/osl-2.1.php
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is the VideoDownloader.
*
* The Initial Developer of the Original Code is
* Javi Moya
*
* Portions created by the Initial Developer are Copyright (C) 2006
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* */
function getBoolPref(prefName, defval) {
var result = defval;
var prefservice = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
var prefs = prefservice.getBranch("");
if (prefs.getPrefType(prefName) == prefs.PREF_BOOL)
{
result = prefs.getBoolPref(prefName);
}
return(result);
}
function hSubmenusOptSet () {
var win = Components.classes["@mozilla.org/appshell/window-mediator;1"].getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow("navigator:browser");
var showicon = document.getElementById('checkboolpref').checked;
var icon = win.document.getElementById('videodownloader-statusbar-panel');